package com.saber.pattern.factory;

/**
 * Descption:
 * author: saber
 * date: 17-4-7
 * time: 下午9:39
 * version: 1.0
 */
public class Factory {

    public Sender getSender(String senderType) {
        if (senderType.equalsIgnoreCase("email")) {
            return new EmailSender();
        } else if (senderType.equalsIgnoreCase("sms")){
            return new SmsSender();
        }
        return null;
    }

}
